<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>七夕快乐！我的心只为你跳动</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #ff9bc9, #ff6b9d);
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            color: #fff;
            padding: 20px;
            text-align: center;
        }

        .container {
            width: 100%;
            max-width: 400px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .heart-container {
            position: relative;
            width: 200px;
            height: 200px;
            margin: 30px 0;
        }

        .heart {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #ff4d87;
            transform: rotate(45deg);
            animation: heartbeat 1.2s infinite;
            box-shadow: 0 0 40px rgba(255, 77, 135, 0.6);
        }

        .heart:before,
        .heart:after {
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #ff4d87;
            border-radius: 50%;
        }

        .heart:before {
            top: -50%;
            left: 0;
        }

        .heart:after {
            top: 0;
            left: -50%;
        }

        @keyframes heartbeat {
            0% {
                transform: rotate(45deg) scale(0.9);
            }
            5% {
                transform: rotate(45deg) scale(1);
            }
            10% {
                transform: rotate(45deg) scale(0.9);
            }
            15% {
                transform: rotate(45deg) scale(1.1);
            }
            50% {
                transform: rotate(45deg) scale(0.9);
            }
            100% {
                transform: rotate(45deg) scale(0.9);
            }
        }

        h1 {
            font-size: 28px;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .message {
            background: rgba(255, 255, 255, 0.2);
            padding: 20px;
            border-radius: 20px;
            margin: 20px 0;
            backdrop-filter: blur(5px);
            box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
        }

        p {
            font-size: 18px;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .footer {
            margin-top: 30px;
            font-size: 14px;
            opacity: 0.8;
        }

        .hearts {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }

        .mini-heart {
            position: absolute;
            background-color: rgba(255, 255, 255, 0.8);
            display: inline-block;
            height: 10px;
            width: 10px;
            transform: rotate(45deg);
            opacity: 0;
        }

        .mini-heart:before,
        .mini-heart:after {
            content: "";
            position: absolute;
            height: 10px;
            width: 10px;
            background-color: rgba(255, 255, 255, 0.8);
            border-radius: 50%;
        }

        .mini-heart:before {
            top: -5px;
            left: 0;
        }

        .mini-heart:after {
            top: 0;
            left: -5px;
        }

        @keyframes float {
            0% {
                opacity: 0;
                transform: rotate(45deg) translateY(0) scale(0);
            }
            50% {
                opacity: 1;
            }
            100% {
                opacity: 0;
                transform: rotate(45deg) translateY(-100px) scale(0.5);
            }
        }

        button {
            background: white;
            color: #ff4d87;
            border: none;
            padding: 12px 30px;
            border-radius: 30px;
            font-size: 16px;
            font-weight: bold;
            margin-top: 20px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        button:active {
            transform: scale(0.95);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }
    </style>
</head>
<body>
    <div class="hearts" id="hearts"></div>

    <div class="container">
        <h1>七夕快乐，我的爱人！</h1>

        <div class="heart-container">
            <div class="heart"></div>
        </div>

        <div class="message">
            <p>我的心只为你跳动</p>
            <p>每一天都因你而更加美好</p>
            <p>爱你，不止今天，而是永远</p>
        </div>

        <button id="moreHearts">更多爱心</button>

        <div class="footer">
            <p>专属为你制作 ❤️ 七夕情人节快乐</p>
        </div>
    </div>

    <script>
        // 创建漂浮的小爱心
        function createHearts() {
            const heartsContainer = document.getElementById('hearts');
            const numberOfHearts = 15;

            for (let i = 0; i < numberOfHearts; i++) {
                const heart = document.createElement('div');
                heart.classList.add('mini-heart');

                // 随机位置
                const left = Math.random() * 100;
                const animationDuration = 3 + Math.random() * 4;
                const animationDelay = Math.random() * 5;
                const size = 5 + Math.random() * 10;

                heart.style.left = `${left}%`;
                heart.style.animation = `float ${animationDuration}s ease-in-out ${animationDelay}s infinite`;
                heart.style.width = `${size}px`;
                heart.style.height = `${size}px`;

                heartsContainer.appendChild(heart);
            }
        }

        // 点击按钮时创建更多爱心
        document.getElementById('moreHearts').addEventListener('click', function() {
            createHearts();

            // 添加点击反馈
            this.textContent = '爱心已送达！';
            this.style.background = '#ff4d87';
            this.style.color = 'white';

            setTimeout(() => {
                this.textContent = '更多爱心';
                this.style.background = 'white';
                this.style.color = '#ff4d87';
            }, 1500);
        });

        // 初始创建爱心
        createHearts();

        // 添加触摸开始事件监听器，防止长按时出现默认菜单
        document.addEventListener('touchstart', function(e) {
            e.preventDefault();
        }, { passive: false });
    </script>
</body>
</html>